<template>
  <n-config-provider :theme="darkThemeStore.darkMode ? darkTheme : null">
    <n-global-style />
    <n-message-provider>
      <RouterView></RouterView>
    </n-message-provider>
  </n-config-provider>
</template>

<script lang="ts" setup>
import { darkTheme } from "naive-ui";
import useDarkThemeStore from '@/store/modules/theme'
const darkThemeStore = useDarkThemeStore()

</script>

<style>
/* 全局样式中设置背景色 */
#app {
  background-color: var(--n-color-primary);
}
</style>
